<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<script src="../script/jquery-1.7.2.js"></script>

	<script>
		// 原生
		// window.onload = function() {
		// 	var btnObj = document.getElementById("btnId");

		// 	btnObj.onclick = function() {
		// 		alert("js 原生的单击事件");
		// 	}
		// }

		// jQuery
		$(function() { //相当于window.onload = function() {}
			var $btnObj = $("#btnId");
			$btnObj.click(function() {
				alert("jQuery的单击事件");
			});
		});
	</script>
</head>
<body>

	<button id="btnId">SayHello</button>

</body>
</html>